package com.fhao.spring.selfblog.mapper;

import com.fhao.spring.selfblog.model.BlogInfo;
import com.fhao.spring.selfblog.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserInfoMapper {
    /**
     * 根据用户名查询用户信息
     */
    @Select("select * from user where user_name = #{userName} and delete_flag = 0")
    UserInfo selectByName(String userName);

    /**
     * 根据用户id 查询用户信息
     */
    @Select("select * from user where id = #{id} and delete_flag = 0")
    UserInfo selectById(Integer id);

}















